<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>常见的内置错误</title>
</head>

<body>

</body>
<script>
  /* 
   * 1、ReferenceError：引用的变量不存在
   */
  //  console.log(a);  // Uncaught ReferenceError: a is not defined


  // 2、TypeError：数据类型不正确的错误
  // let a;
  // console.log(a.xxx); //Uncaught TypeError: Cannot read property 'xxx' of undefined

  // 3、RangeError：数据值不在其所允许的范围内
  // function fn() {
  //   fn()
  // }
  // fn()  //Uncaught RangeError: Maximum call stack size exceeded

  // 4、SyntaxError：语法错误
  // const c = """"; //Uncaught SyntaxError: Unexpected string



</script>

</html>